﻿Public Class MapPage
    Public panel As Panel
    Public backButton As Button
    Public floorLabel As Label
    Public r1Label As Label
    Public r2Label As Label
    Public r3Label As Label
    Public r4Label As Label
    Public r5Label As Label
    Public r6Label As Label
    Public r1CheckBox As CheckBox
    Public r2CheckBox As CheckBox
    Public r3CheckBox As CheckBox
    Public r4CheckBox As CheckBox
    Public r5CheckBox As CheckBox
    Public r6CheckBox As CheckBox
    Public r1Button As Button
    Public r2Button As Button
    Public r3Button As Button
    Public r4Button As Button
    Public r5Button As Button
    Public r6Button As Button

    Public Sub ShowMap()
        panel = New Windows.Forms.Panel
        panel.Name = "mapPanel"
        panel.Size = New System.Drawing.Size(800, 500)
        panel.Location = New System.Drawing.Point(0, 0)
        panel.BackgroundImage = Image.FromFile _
            (System.Environment.GetFolderPath _
            (System.Environment.SpecialFolder.Personal) _
            & "\bckgrnd.png")
        r1Button = New Windows.Forms.Button
        r1Button.Name = "r1Button"
        r1Button.Size = New System.Drawing.Size(400, 400)
        r1Button.Location = New System.Drawing.Point(0, 0)
        r1Button.Text = "101"
        r1Button.BackColor = Color.Honeydew

        r1Label = New Windows.Forms.Label
        r1Label.Name = "r1Label"
        r1Label.Location = New System.Drawing.Size(185, 23)
        r1Label.Size = New System.Drawing.Size(30, 20)
        r1Label.Text = "101"

        r1CheckBox = New Windows.Forms.CheckBox
        r1CheckBox.Name = "r1CheckBox"
        r1CheckBox.Location = New System.Drawing.Point(190, 190)


        backButton = New Windows.Forms.Button
        backButton.Name = "backButton"
        backButton.Size = New System.Drawing.Size(125, 125)
        backButton.Location = New System.Drawing.Point(645, 325)
        backButton.Text = "Back"
        backButton.BackColor = Color.White

        AddHandler backButton.Click, AddressOf backButton_Click

        panel.Controls.Add(r1Button)
        panel.Controls.Add(r2Button)
        panel.Controls.Add(r3Button)
        panel.Controls.Add(r4Button)
        panel.Controls.Add(r5Button)
        panel.Controls.Add(r6Button)
        r1Button.Controls.Add(r1Label)
        r1Button.Controls.Add(r1CheckBox)
        panel.Controls.Add(r2CheckBox)
        panel.Controls.Add(r3CheckBox)
        panel.Controls.Add(r4CheckBox)
        panel.Controls.Add(r5CheckBox)
        panel.Controls.Add(r6CheckBox)
        panel.Controls.Add(backButton)
        Form1.Controls.Add(panel)
    End Sub

    Private Sub backButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        panel.SendToBack()
    End Sub
End Class
